<template>
    <div class="count-content">
        <div class="count">
            <div class="item">
                <div class="num"><strong>{{ props.data }}</strong>人</div>
                <span>目前专属法务</span>
            </div>
            <div class="item">
                <div class="num"><strong>5</strong>分钟</div>
                <span>急速响应时间</span>
            </div>
        </div>
        <div class="btn" @click="$router.push('/chat')">立即进入我的法务部<span v-if="chatDataStore.unReadNum > 0">{{ chatDataStore.unReadNum }}</span></div>
    </div>
</template>
<script lang="ts" setup>
import { useChatDataStore } from '@/store/chat';

const chatDataStore = useChatDataStore()

const props = defineProps({
    data: Number
})


</script>
<style lang="scss" scoped>
.count-content{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    height: calc(100% - 74px);
}
.count{
    display: flex;
    justify-content: center;

    .item{
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        margin: 0 40px;

        .num{
            font-size: 16px;
            color: #005daf;

            strong{
                font-size: 26px;
            }
        }

        span{
            font-size: 14px;
            color: #666;
        }
    }
}

.btn{
    width: 240px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    background-color: #0359a2;
    color: #fff;
    border-radius: 25px;
    margin: 0 auto;
    cursor: pointer;
    position: relative;
    font-size: 16px;

    span{
        position: absolute;
        display: block;
        width: 20px;
        height: 20px;
        line-height: 20px;
        background-color: red;
        color: #fff;
        border-radius: 50%;
        font-size: 12px;
        text-align: center;
        top: -10px;
        right: -10px;
    }
}
</style>